package com.whfp.coky.app

import com.whfp.coky.api.response.LoginStaffBean

/**
 *
 *
 * created by coky on 2022/3/2
 */
class AppDatas {
    companion object {
        @Volatile private var instance: AppDatas? = null
        fun getInstance() =
            instance ?: synchronized(this) {
                instance ?: AppDatas().also { instance = it }
            }
    }

//    登录获取token
    var token: String = ""
    internal var staffBean: LoginStaffBean? = null
        set(value){
        field = value
        value?.let {
            token = it.access_token!!
//            if (token.isEmpty()){
//                token = it.access_token
//                RetrofitClient.getInstance().addTokenHeader(it.access_token)
//            }
        }
    }


}